package com.chinasoft.config;

import org.springframework.context.annotation.*;
import org.springframework.transaction.annotation.EnableTransactionManagement;

import java.util.Random;

@Configuration //一个 Spring 配置类
@ComponentScan({"com.chinasoft.service"})
@Import({JdbcConfig.class, MybatisConfig.class})
@EnableAspectJAutoProxy
@EnableTransactionManagement  // 开启事务管理
public class SpringConfig {

    @Bean
    public Random getRandom() {
        return new Random();
    }
}